package com.ymttest.database.sqlwapper.anlihui;

import java.util.List;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.anlihui.SettlementDetail;
import com.ymttest.database.model.anlihui.YmtAnlihuiProduct;
import com.ymttest.database.model.anlihui.YmtAnlihuiRebateConfig;

public class YmtAnlihuiRebateWrapper {
	SqlManager manager;

    public YmtAnlihuiRebateWrapper() {
        manager = new SqlManager("intpro");
    }
    
    @SuppressWarnings("unchecked")
	public YmtAnlihuiRebateConfig selectByPrimaryKey(Integer id) {
    	
    	YmtAnlihuiRebateConfig ymtAnlihuiRebateConfig = new YmtAnlihuiRebateConfig();
    	List<YmtAnlihuiRebateConfig> result = manager
                .getSelectResults(
                        "com.ymttest.database.mapping.anlihui.YmtAnlihuiRebateConfigMapper.selectByPrimaryKey",
                        id);
        manager.commit();
        
		if (result.size() > 0) {
			ymtAnlihuiRebateConfig = result.get(0);
		}
		
        return ymtAnlihuiRebateConfig;
    }
    
    public static void main(String[] args) {
    	
    	YmtAnlihuiRebateWrapper test = new YmtAnlihuiRebateWrapper();
    	System.out.println(test.selectByPrimaryKey(1).getSecondCategoryId());
    }
}
